package mini.hug;

import owg.util.Calc;
import owg.util.opengl.ColorF;
import world.Sound;
import hubol.Entity;

public class Birgus extends Entity{
	private Shake s = Hug.me.shake();

	public Birgus(double x, double y) {
		super(x, y);
		Sound.playPitched("birgus");
		sprite = Hug.BIRGUS;
		
		imageSingle = (float)Calc.random(2);
		imageSpeed = .1f;
		
		setDirSpeed(90 + Calc.rangedRandom(5), 7);
		
		if (hspeed > 0)
			xscale = -1;
	}
	
	public void step(){
		hspeed *= 1.01;
		super.step();
	}
	
	public void render(){
		sprite.render(imageSingle, x + s.x, y + s.y, .25f * xscale, .25f, (float)(s.z / 8.0), ColorF.WHITE);
	}

}
